package com.mentaleye.dal.dao.mybatis;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.mentaleye.dal.dao.StudentPropertyLoanRecordDao;
import com.mentaleye.dal.model.StudentPropertyLoanRecord;
import com.mentaleye.dal.model.StudentPropertyLoanRecordExample;
import com.mentaleye.dal.service.StudentPropertyLoanRecordMapper;

@Repository
public class StudentPropertyLoanRecordDaoImpl implements StudentPropertyLoanRecordDao {

	@Autowired StudentPropertyLoanRecordMapper recordMapper;
	
	@Override
	public boolean insertRecord(StudentPropertyLoanRecord record) {
		boolean isSuccess=false;
		if(this.recordMapper.insert(record)>0){
			isSuccess=true;
		}
		return isSuccess;
	}

	@Override
	public boolean updateRecord(StudentPropertyLoanRecord record) {
		boolean isSuccess=false;
		if(this.recordMapper.updateByPrimaryKey(record)>0){
			isSuccess=true;
		}
		return isSuccess;
	}

	@Override
	public boolean deleteByExample(StudentPropertyLoanRecordExample example) {
		boolean isSuccess=false;
		if(this.recordMapper.deleteByExample(example)>0){
			isSuccess=true;
		}
		return isSuccess;
	}

	@Override
	public List<StudentPropertyLoanRecord> getListByExample(StudentPropertyLoanRecordExample example) {
		return this.getListByExample(example);
	}

	@Override
	public List<Map<String, Object>> getListByMap(Map<String, Object> map) {
		return this.recordMapper.getListByMap(map);
	}
}
